package com.study.a05Test;

import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {


        ArrayList<Lihuamao> list1 = new ArrayList<>();
        ArrayList<PersianCat> list2 = new ArrayList<>();
        ArrayList<TeddyDog> list3=new ArrayList<>();
        ArrayList<HuskyDog> list4=new ArrayList<>();

        keepPet(list1);
        keepPet(list2);
        keepPet(list3);
        keepPet(list4);



    }


    public static void keepPet(ArrayList<? extends Animal> list){

    }

    //能养猫但是不能养狗
    /*public static void keepPet(ArrayList<? extends Cat> list){

    }*/
}
